package com.sunny.springboot2.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author sunny
 * @date 2018/11/27
 */
@ApiModel
@AllArgsConstructor
@NoArgsConstructor
@Data
public class User implements Serializable {


    private static final long serialVersionUID = 6493673632710916960L;

    private Long id;
    @ApiModelProperty("用户名")
    private String userName;
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("角色名")
    /** 角色名：Shiro 支持多个角色，而且接收参数也是 Set<String> 集合，但这里为了简单起见定义成 String 类型了 */
    private String roleName;
    @ApiModelProperty("是否禁用")
    /** 是否禁用 */
    private boolean locked;

    public User(long id, String userName, String password) {
        this.id = id;
        this.userName = userName;
        this.password = password;
    }
}
